import React from 'react';
import PropTypes from 'prop-types';
import LazyLoadImage from './widget/LazyLoadImage';

export default class SingleBlog extends React.Component {
	constructor (props) {
		super(props);
		this.state = props.data;
	}

	render () {
		return (
			<div className={'md-single-blog'}>
				<a>
					{/*<img src={this.state.image} alt={'thumb'}/>*/}
					<LazyLoadImage src={this.state.image}/>
				</a>
				<div className={'post-content'}>
					<div className={'post-header'}>
						<a className="post-cat">{this.state.tag}</a>
						<h2>{this.state.title}</h2>
					</div>
					<div className={'entry-content'}>
						<p>{this.state.desc}</p>
					</div>
					<div className="continue-reading">
						<a>Continue Reading</a>
					</div>
					<div className="post-meta">
						<ul className="pull-left list-inline author-meta">
							<li className="author">By <a>{this.state.author} </a></li>
							<li className="date"> On {this.state.created_at}</li>
						</ul>
					</div>
				</div>
			</div>
		);
	}
}

SingleBlog.propTypes = {
	data: PropTypes.object
};